import { request } from '@/sheep/request';
import { CRUD } from '@/sheep/request/crud';

export default {
  ...CRUD('user/admin/user', ['list', 'detail', 'edit', 'delete']),
  recharge: (data) =>
    request({
      url: 'user/admin/user/recharge',
      method: 'POST',
      data,
      options: {
        showSuccessMessage: true,
      },
    }),
  walletLog: {
    money: (id, params) =>
      request({
        url: `user/admin/walletLog/money/${id}`,
        method: 'GET',
        params,
      }),
    score: (id, params) =>
      request({
        url: `user/admin/walletLog/score/${id}`,
        method: 'GET',
        params,
      }),
    commission: (id, params) =>
      request({
        url: `user/admin/walletLog/commission/${id}`,
        method: 'GET',
        params,
      }),
  },
};
